import request from '@/utils/request'

export function page(query) {
  return request({
    url: '/admin/replaceit/page',
    method: 'get',
    params: query
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/replaceit/' + obj.replaceitId,
    method: 'put',
    data: obj
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/replaceit',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/replaceit/' + id,
    method: 'get'
  })
}

export function ActiveObj(id) {
  return request({
    url: '/admin/replaceit/' + id,
    method: 'put',
    data: {
      replaceitId: id,
      status: 0
    }
  })
}

export function DisableObj(id) {
  return request({
    url: '/admin/replaceit/' + id,
    method: 'put',
    data: {
      replaceitId: id,
      status: 1
    }
  })
}
